<template>
	<view class="ciPJDa">
		<view class="ciPJDaList">
			<view class="ciPJDaLi" v-for="(item, index) of list" :key="index">
				<view class="ciPJDaLiHead">
					<view class="ciPJDaLiHeadLeft">
						申请时间：{{item.createTime}}
					</view>
					<view class="ciPJDaLiHeadRight">
						<text class="ciPJDaLiHeadRight-txt">未完善</text>
						<!-- <text class="ciPJDaLiHeadRight-txt">已完善</text> -->
					</view>
				</view>
				<view class="ciPJDaLiMain">
					<view class="ciPJDaLiMainMsg">
						<image class="ciPJDaLiMainMsgImg" src="https://www.zzzsyh.com/applets/agent/agent/head.png" mode=""></image>
						<view class="ciPJDaLiMainMsgRight">
							<view class="ciPJDaLiMainMsgRightName">
								<text class="ciPJDaLiMainMsgRightName-txt1">
									{{item.storeName}}
								</text>
								<text class="ciPJDaLiMainMsgRightName-txt2">
									{{item.storePhone}}
								</text>
							</view>
							<view class="ciPJDaLiMainMsgRightAddress">
								{{item.storeDetailAddress}}
							</view>
						</view>
					</view>
					<view class="ciPJDaLiMainBtn">
						<view class="ciPJDaLiMainBtnLeft" @click="cli_playPhone(item.storePhone)">
							<image class="ciPJDaLiMainBtnLeftImg" src="https://www.zzzsyh.com/applets/agent/agent/phone.png" mode=""></image>
							<text>拨打电话</text>
						</view>
						<view class="ciPJDaLiMainBtnRight" @click="cli_next(item, index)">
							去审核
						</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import allapi from '../api/index.js'
	export default {
		data() {
			return {
				agentId: uni.getStorageSync('agentId'),
				list: []
			}
		},
		onShow() {
			// 获取待审核配件店列表
			this.getPartsStoreAuditList()
		},
		mounted() {
			
		},
		methods: {
			// 点击下一步
			cli_next(item, index) {
				let id = item.id
				uni.navigateTo({
					url: '/pages/centerInvitePJDaduitDetails/centerInvitePJDaduitDetails?id=' + id
				})
			},
			// 点击拨打电话
			cli_playPhone(val) {
				uni.makePhoneCall({
					phoneNumber: val //仅为示例
				});
			},
			// 获取待审核配件店列表
			getPartsStoreAuditList() {
				uni.request({
					url: allapi.getPartsStoreAuditList,
					data: {
						agentId: this.agentId
					},
					success: (res) => {
						console.log(res);
						let dat = res.data.data
						this.list = dat
					}
				})
			},
		}
	}
</script>

<style scoped>
	.ciPJDa {
		position: absolute;
		width: 100%;
		height: 100%;
		left: 0;
		top: 0;
		background: linear-gradient(180deg, #FDD194 0%, #F6F6F6 100%);
	}

	.ciPJDaList {
		margin: 0 24rpx;
	}

	.ciPJDaLi {
		border-radius: 16rpx;
		overflow: hidden;
		margin-top: 24rpx;
	}

	.ciPJDaLiHead {
		display: flex;
		height: 74rpx;
		/* align-items: center; */
		/* margin-bottom: 5rpx; */
	}

	.ciPJDaLiHeadLeft {
		flex: 1;
		background: #FFFFFF;
		line-height: 74rpx;
		font-size: 24rpx;
		font-weight: 400;
		color: #999999;
		padding-left: 24rpx;
	}

	.ciPJDaLiHeadRight {
		width: 184rpx;
		/* background: red; */
		background-image: url('https://www.zzzsyh.com/applets/agent/agent/23.png');
		background-size: 100%;
		background-repeat: no-repeat;
		font-size: 28rpx;
		color: #F48F5F;
		text-align: center;
		line-height: 40rpx;
		padding-top: 14rpx;
	}

	.ciPJDaLiMain {
		/* padding: 24rpx; */
		background: #FFFFFF;
		padding-bottom: 40rpx;
	}

	.ciPJDaLiMainMsg {
		min-height: 112rpx;
		margin: 0 24rpx;
		border-top: 1rpx solid #EEEEEE;
		display: flex;
		padding-top: 30rpx;
	}

	.ciPJDaLiMainMsgImg {
		width: 112rpx;
		height: 112rpx;
		border-radius: 50%;
	}

	.ciPJDaLiMainMsgRight {
		margin-left: 28rpx;
		flex: 1;
	}

	.ciPJDaLiHeadRight-txt {
		margin-left: 30rpx;
	}

	.ciPJDaLiMainMsgRightName {
		line-height: 44rpx;
	}

	.ciPJDaLiMainMsgRightName-txt1 {
		font-size: 32rpx;
		color: #333333;
	}

	.ciPJDaLiMainMsgRightName-txt2 {
		font-size: 32rpx;
		color: #666666;
		margin-left: 24rpx;
	}

	.ciPJDaLiMainMsgRightAddress {
		font-size: 28rpx;
		color: #666666;
		font-weight: 400;
		margin-top: 16rpx;
		line-height: 40rpx;
	}

	.ciPJDaLiMainBtn {
		/* margin-top: 44rpx; */
		display: flex;
		justify-content: space-between;
		align-items: center;
		margin: 40rpx 48rpx 0 48rpx;
	}

	.ciPJDaLiMainBtnLeft {
		width: 184rpx;
		height: 64rpx;
		line-height: 64rpx;
		text-align: center;
		border-radius: 34rpx;
		border: 2rpx solid #333333;
		font-size: 24rpx;
		color: #333333;
		display: flex;
		justify-content: center;
		align-items: center;
	}

	.ciPJDaLiMainBtnLeftImg {
		width: 26rpx;
		height: 26rpx;
		margin-right: 10rpx;
	}

	.ciPJDaLiMainBtnRight {
		display: block;
		width: 180rpx;
		height: 72rpx;
		background: linear-gradient(to bottom, #F27E75, #E22F48);
		border-radius: 32rpx;
		font-size: 28rpx;
		color: #FFFFFF;
		display: flex;
		align-items: center;
		justify-content: center;
	}
</style>
